import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import '@/utils/vant-ui.js'
import 'amfe-flexible'
import request from '@/utils/request.js'
import '@/styles/index.scss'
import { getRelativeTime, formatTime } from '@/utils/date-time.js'

Vue.config.productionTip = false
// 把request请求挂载到vue的原型上，以至于其他地方都可以调用到
Vue.prototype.$request = request
// 定义一个过滤器用来过滤时间格式
Vue.filter('relative', getRelativeTime)
Vue.filter('formatTimes', formatTime)
// 创建一个谁都能访问到的事件总线
Vue.prototype.$eventBus = new Vue()
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
